package com.scenic.common.service;

import com.github.pagehelper.PageInfo;
import com.scenic.common.bean.ScenicSpot;
import com.scenic.common.exception.ScenicSpotException;

import java.util.List;
import java.util.Map;

public interface ScenicSpotService {
    //添加
    void  insert(ScenicSpot scenicSpot) throws ScenicSpotException;
    //根据id删除
    void  delete(Long id) throws ScenicSpotException;
    //根据id修改
    void update(ScenicSpot scenicSpot) throws ScenicSpotException;
    //根据id查询
    ScenicSpot selectById(Long id) throws ScenicSpotException;
    //搜索 —— 分页查询
    PageInfo<ScenicSpot> selectByCondition(ScenicSpot condition, Integer pageNum, Integer pageSize);
    PageInfo<ScenicSpot> selectByCondition1(ScenicSpot condition, Integer pageNum, Integer pageSize);
    //统计热门景点前五
    List<Map<String, Object>> scenicSpotSaleTop5();
}
